import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const routes = [
  {
    path: '/pages/friendsChat',
    component: () => import('@/pages/tabBar/API/API.vue'), // 动态导入页面组件
	children:[
		{
			path: 'chat',
			name: 'chat',
			component: () => import('@/pages/friendsChat/chatPage/chat.vue')
		},
		{
			path: 'community',
			name: 'community',
			component: () => import('@/pages/friendsChat/communityGroupPage/community.vue')
		},
		{
			path: 'chat',
			name: 'chat',
			component: () => import('@/pages/friendsChat/telListPage/telList.vue')
		},
	]
  },
];

const router = new Router({
  mode: 'history', // 或 'hash'，具体看需求
  routes,
});

export default router;
